package com.lxw.study.creational.factorymethod.case3;

import java.util.UUID;

public class LoggerFactoryExample {
    public static void main(String[] args) {
        // 使用 Logback 日志记录器工厂
        LoggerFactory logbackFactory = new LogbackLoggerFactory();
        Logger logger = logbackFactory.getLogger(LoggerFactoryExample.class);
        LogContextHolder.THREAD_LOCAL.set(UUID.randomUUID().toString());
        // 记录日志
        logger.info("This is an info message");
        logger.error("This is an error message");
    }
}
